home
***
CD-ROM
|
disk
|
FTP
|
other
***
search
/
Dr. Windows 3
/
dr win3.zip
/
dr win3
/
PROGRAMR
/
LB09D.ZIP
/
OPEN.BAS
< prev
next >
Wrap
BASIC Source File
|
1992-01-30
|
700b
|
33 lines
'test the file capabilities
PRINT "Now will open a file and print some information into it."
OPEN "TESTFILE" FOR OUTPUT AS #TEST
PRINT #TEST, "This is a test of the emergency broadcast"
PRINT #TEST, "system. This is only a test."
PRINT #TEST, ""
PRINT "Please type a sentence."
INPUT ">"; s$
length = LEN(s$)
' break s$ up, one line per word
sLen = LEN(s$)
FOR count = 1 TO sLen
c$ = MID$(s$,count,1)
copy$ = copy$ + c$
IF c$ <> " " THEN [Skip]
copy$ = copy$ + CHR$(13) + CHR$(10)
[Skip]
NEXT count
PRINT #TEST, copy$
PRINT copy$
CLOSE #TEST
PRINT "Done."